package _general;


public interface TestInterface {

	String name = "unspecified Algorithm";
	/**
	 *  creates a list of objects, which will be used for the specific algorithm
	 *  @param preSort - determine the presortion of the testcase; random, ascending and descending available
	 *  @param numberElements - determine the size of the testcase
	 */
	public void createInitialList (String preSort, int numberElements) throws Exception;
	
	/**
	 *  creates a list of objects, which will be used for the specific algorithm
	 *  @param preSort - determine the presortion of the testcase; random, ascending and descending available
	 *  @param numberElements - determine the size of the testcase
	 *  @param randomSeed - is used, if the chosen problem is a random problem, then you need the given
	 *  random seed to create the random testcase 
	 */
	public void createInitialList (String preSort, int numberElements, long randomSeed) throws Exception;
	
	/**
	 *  after the algorithm did his stuff, this method will return the result of the algorithm 
	 * @return the result of the algorithm
	 */
	public Object getResult();
	
	/**
	 *  get a specific element from the initial list
	 * @param index the element, which should be returned
	 * @return the related object from the inital list 
	 */
	public Object get(int index);
	
	/**
	 * starts the implemented algorithm
	 */
	public void start ();
	
	/**
	 * tests the result from the algorithm, if it is a correct result
	 * @return true, if the result is correct
	 */
	public boolean checkResult();
	
	/**
	 * prints the inital problem to the console, if it is not possible, it does nothing
	 */
	public void problemToConsole();
	
	
	/**
	 * opens a new window, to show the problem in this window, if this makes no sence, don't 
	 * open a window
	 */
	public void problemToWindow();
	
	
	/**
	 * shows the result of the algorithm in the right way. The implementation determines, which
	 * is the right visualization.
	 */
	public void showResult();
	
	
	/**
	 * Returns the name of the algorithm
	 */
	public String getName();
	
	/**
	 * unlink every reference to every instantiated object
	 */
	public void destroy();
}
